package assignmentonepenguins



import grails.test.mixin.*
import org.junit.*

/**
 * See the API for {@link grails.test.mixin.domain.DomainClassUnitTestMixin} for usage instructions
 */
@TestFor(Bidding)
class BiddingTests {
    /*
     * NOTE: The test for requirement B-4 is located in ListingTests.groovy
     */

    void test_RequiredFields() {
        // Test missing required fields (B-1, B-2, B-3)
        Bidding bid = new Bidding()
        assert !bid.validate()

        // Test all required fields (B-1, B-2, B-3)
        bid.setAmount(199.99)
        bid.setBidder(new Customer())
        bid.setListing(new Listing())
        assert bid.validate()
    }
}
